package chapter30.meituan;

public class Producer implements Runnable{
    private Box b;
    private int number;

    public Producer(Box b,int num){
        this.b = b;
        this.number=num;
    }
    @Override
    public void run() {
        for(int i = 1 ;i<=number;i++){
            b.put(i);
        }
    }
}